package menuTree;

import java.util.ArrayList;

public class MenuTreeManager {

	MenuTreeDAO objectDAO;
	Node head;
	
	public MenuTreeManager(){
		objectDAO = new MenuTreeDAO();
		head = new Node(0 , 0 ,null);
	}
	
	public static void main(String[] args) {
		MenuTreeManager t = new MenuTreeManager();
		t.prepareHead();
	}
	
	public void prepareHead(){
		System.out.println("start ");
		head.setChild(prepareChilds(0));
		System.out.println("start ");
		
	}
	
	private ArrayList<Node> prepareChilds(Integer id){
		
	/*	ArrayList<Node> list = objectDAO.getCatsByParent(id);
		if(list == null || list.size()==0)
			return null;
		for(Node data : list){
			//System.out.println("id : " + data.getId() + " parent_id: " + data.getParentId() + " name:" + data.getName());
			ArrayList<Node> tmp = prepareChilds(data.getId());
			if(tmp==null)
				data.setChild(null);
			else 
				data.setChild(tmp);
			
		}
		return list;*/
		return null;
	}
	
}
